package strategy;

/**
 * @author Lion
 * mini鸭子模拟器-测试执行
 */
public class MiniDuckSimulator {
	public static void main(String[] args) {
		Duck mallard = new MallardDuck();
		mallard.performFly();
		mallard.performQuack();
		
		Duck model = new ModelDuck();
		model.performFly();
//		要想改变行为,只需调用setter方法
		model.setFlyBehavior(new FlyRocketPowered());
		model.performFly();
	}
}
